package com.loyal.rx3;

import androidx.annotation.NonNull;

import com.loyal.client.RetroCallManager;

import retrofit2.CallAdapter;
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;

public class RetroManager extends RetroCallManager {
    private static final String TAG = RetroManager.class.getSimpleName();
    private static volatile RetroManager mInstance;

    public RetroManager() {
        super();
    }

    public static RetroManager getInstance() {
        if (mInstance == null) {
            synchronized (RetroManager.class) {
                if (mInstance == null)
                    mInstance = new RetroManager();
            }
        }
        return mInstance;
    }

    @NonNull
    @Override
    public CallAdapter.Factory factory() {
        return RxJava3CallAdapterFactory.create();
    }
}